-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APS-1677 AP occupancy view #2264
Conversation
5dc8ed4
to
5e0bcce
Compare
<ul class="calendar__month govuk-list"> | ||
{% for day in month.days %} | ||
<li class="calendar__day calendar__day--{{ day.name.slice(0,3) | lower }}{% if day.status !== 'available' %} {{ 'govuk-tag--yellow' if day.status in ['availableForCriteria','full'] else 'govuk-tag--red' }}{% endif %}"> | ||
<a class="calendar__link" href="{% if day.link %}{{ day.link }}{% else %}#{% endif %}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this assumes that all calendars are rendered with a link
property in their day structures. I could put this in the lower level day templates, but that would mean more of the day rendering, including the date name, would be duplicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me and seems sensible.
Only other nit picking suggestion I could make is to maybe squash the commits?
@@ -21,5 +21,13 @@ export const premisesActions = (user: UserDetails, premises: Premises) => { | |||
}) | |||
} | |||
|
|||
if (user.permissions.includes('cas1_premises_view') && premises.supportsSpaceBookings) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to an explicit test for permission - but this permission is already given to users in prod.
The supportsSpaceBookings
flag however is not set on any premises ATM, and will be set on rollout in February.
df4809f
to
7c0a7ee
Compare
db3c4fd
to
d27d30f
Compare
Context
https://dsdmoj.atlassian.net/browse/APS-1677
Changes in this PR
Adds the occupancy view (calendar) page with a link from the premises view action menu.
Screenshots of UI changes